A point-of-sale (“POS”) device can include various components, such as a processor, a card reader, a network connection interface, and a receipt printer. Card readers are typically built to read transaction information from cards, such as credit cards or debit cards.
When two devices are connected via a universal serial bus (“USB”) connection, one device acts as the host and the other acts as a peripheral device. The host typically initiates all communication across the connection, while the peripheral device is typically limited to responding when requested by the host. In a typical USB connection, these connection roles cannot be reversed once connected—that is, the host device cannot become the peripheral device, and the peripheral device cannot become the host device. Peripheral devices may be “smart,” in that they are also capable of being host devices if connected differently, or “dumb,” in that they are only ever capable of being peripheral devices.
A host device can connect to multiple peripheral devices simultaneously via a USB hub. A USB hub typically includes one host connector that connects to a host device and multiple peripheral connectors that each connect to peripheral devices. In a typical USB hub, these connection roles cannot be reversed once connected—that is, the host device cannot become any of the peripheral devices, and none of the peripheral devices can become the host device. Even if it would be advantageous for a “smart” peripheral device to have access to other peripheral devices connected to the hub, this is impossible in a typical USB hub, as only the host has access to any of the peripheral devices.
The USB On-The-Go (“USB OTG”) and USB Type-C standards gave USB connections an additional ID pin and was developed to allow two devices linked over a USB connection to allow the two devices to switch host or peripheral roles. However, USB OTG and USB Type-C connections only permit role swapping when a single host device is connected to a single peripheral device, and do not permit role swapping through a hub, where specific USB ports or USB plugs of the hub are typically permanently assigned to a host or peripheral role.
Thus, there is a need in the art for role swapping circuitry for USB hub systems.